/*
 * Copyright (c) 2020. André Mion
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.andremion.louvre.data;


import ohos.media.photokit.metadata.AVStorage;
import ohos.utils.net.Uri;

/**
 * Helper class used by {@link MediaLoader}
 */
class MediaQuery {
    private MediaQuery() {
    }

    static final Uri GALLERY_URI = AVStorage.Images.Media.EXTERNAL_DATA_ABILITY_URI;

    static final String[] IMAGE_PROJECTION = {
            AVStorage.Images.Media.ID,
            AVStorage.Images.Media.DISPLAY_NAME,
            AVStorage.Images.Media.DATA
    };
    static final String[] ALL_IMAGE_PROJECTION = {
            AVStorage.Images.Media.ID,
            AVStorage.Images.Media.DISPLAY_NAME,
            AVStorage.Images.Media.DATA
    };
    static final String MEDIA_SORT_ORDER = AVStorage.Images.Media.DATE_ADDED + " DESC";

    static final String[] BUCKET_PROJECTION = {
            AVStorage.Images.Media.DISPLAY_NAME,
            AVStorage.Images.Media.DATA
    };
    static final String BUCKET_SELECTION = "1) GROUP BY (1";
    static final String BUCKET_SORT_ORDER = "MAX(" + AVStorage.Images.Media.DATE_ADDED + ") DESC";

}
